package com.yyx.up.web.service.impl;

import com.yyx.up.web.bean.Admin;
import com.yyx.up.web.dao.AdminDao;
import com.yyx.up.web.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Description: 管理员的服务对象
 * @Author: yyx
 * @Create: 2023/5/26 20:07
 * @Version: 8
 */
@Service
@Transactional
public class AdminServiceImpl implements AdminService {
    @Autowired
    private AdminDao adminDao;

    @Override
    public List<Admin> findAllAdmins() {
        return this.adminDao.findAllAdmins();
    }

    @Override
    public int addAdmin(Admin admin) {
        return this.adminDao.addAdmin(admin);
    }
}
